<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<c:set var="currentMenu" value="${boardType }" />
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="" />
<title>JK Holdings</title>
<script src="/js/jquery-1.6.4.js"></script>
<link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
</head>

<body id="top">
	<!-- 공통 헤더 시작 -->
	<%@ include file="/WEB-INF/head.jsp"%>
	<!-- 공통 헤더 끝 -->

	<!-- 메인 네비게이션 시작  -->
	<%@ include file="/WEB-INF/navigation.jsp"%>
	<!-- 메인 네비게이션 끝  -->

	<div id="content-wrapper">
		<div class="center-wrapper">

			<div class="content" id="content-two-columns">

				<div id="main-wrapper">
					<div id="main">
						<div class="post">
							<div class="post-title">
								<h1>
								<c:choose>
									<c:when test='${ (boardType == "qna") ||( boardType == "QNA") }'>
							            질문/답변 게시판
							        </c:when>
							        <c:otherwise>
							           공지 사항 게시판
							        </c:otherwise>
								</c:choose>
								</h1>
							</div>

							<div class="post-body">
								<table>
									<thead>
										<tr>
											<th>번호</th>
											<th>제목</th>
											<th>작성일</th>
											<th>작성자</th>
										</tr>
									</thead>

									<tbody>
										<%@ include file="/WEB-INF/views/board/articleList.jsp"%>
									</tbody>
									<tfoot>
										<tr>
											<td colspan="4">
												<c:if test="${endPageNumber-1>0}">
												<div  id="pagination">
													<ul>
														<li class="previous-off"><c:if test="${previousStatus == true}"><a href="/board/list?boardType=${boardType}&pageNumber=${startPageNumber-1}"></c:if>«이전<c:if test="${previousStatus == true}"></a></c:if></li>
														<!-- <li class="active">1</li>
														<li><a href="#">2</a></li>
														<li><a href="#">3</a></li>
														<li><a href="#">4</a></li>
														<li><a href="#">5</a></li>
														<li><a href="#">6</a></li>
														<li><a href="#">7</a></li> -->
														<c:forEach begin="0" end="${endPageNumber-1}" step="1" var="indexVar">
															<li><a href="/board/list?boardType=${boardType}&pageNumber=${startPageNumber+indexVar}">${startPageNumber+indexVar}</a></li>
														</c:forEach>
														<li class="next-off"><c:if test="${nextStatus == true}"><a href="/board/list?boardType=${boardType}&pageNumber=${endPageNumber+1}"></c:if>다음 »<c:if test="${nextStatus == true}"></a></c:if></li>
													</ul>
												</div>
												</c:if>
											</td>
										</tr>
									</tfoot>
								</table>
								<c:if test='${ ( boardType == "qna" ) || ( boardType == "QNA" ) || (session != null) }'>
								<button type="button" class="write" onclick="location.href='/board/form.do?boardType=${boardType}'">
									<span>쓰기</span>
								</button>
								</c:if>
								<!-- <button type="button" class="list"><span>목록</span></button> -->
							</div>
						</div>
					</div>
				</div>

				<div id="sidebar-wrapper">
					<div id="sidebar">

						<!-- 카테고리 box 시작 -->
						<%@ include file="/WEB-INF/category.jsp"%>
						<!-- 카테고리 box 끝 -->

						<div class="box nobborder">

							<div class="box-title">About</div>

							<div class="box-content">
								<p>뭔가 About 설명이 들어가야할 영역</p>
							</div>

						</div>

					</div>
				</div>

				<div class="clearer">&nbsp;</div>

			</div>

		</div>
	</div>

	<!-- bottom 시작 -->
	<%@ include file="/WEB-INF/bottom.jsp"%>
	<!-- bottom 끝 -->

</body>
</html>